home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 May / 1984-05.d64 / ski physics_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  108 lines

  1. 5 print"[147]"
  2. 15 poke52,48:poke56,48:clr:k=12288:pc=56334:cp=53272
  3. 16 pokepc,peek(pc)and254:poke1,peek(1)and251
  4. 20 forj=0to512:pokek+j,peek(53248+j):nextj
  5. 25 fori=216to255:reada%:pokek+i,a%:nexti:fori=280to327:readb%:pokek+i,b%:nexti
  6. 26 poke1,peek(1)or4:pokepc,peek(pc)or1
  7. 30 print"[147]":pokecp,21:bc=53280:bk=53281:pokebc,5:pokebk,1
  8. 35 print"[144]ski physics"
  9. 50 v=54272:forl=vtov+24:pokel,0:next
  10. 52 pokev+5,88:pokev+4,33:pokev+24,143:pokev+6,195
  11. 55 readlf,hf,dr:iflf=-1then65
  12. 60 pokev,lf:pokev+1,hf:fort=1todr:nextt:goto55
  13. 65 pokev,0:pokev+1,0:pokev+24,0:d=1
  14. 75 printspc(131)"[144]press the  f1 key"
  15. 80 geta$:ifa$=""then80
  16. 85 ifa$=chr$(133)thenondgoto100,140,185,225,250
  17. 90 goto80
  18. 100 print"[147]":pokebc,6:pokebk,1:print:printspc(104)"[144][175][175]"
  19. 105 printspc(13)"[144][208][207][167][165][170][205]  [206][180][170][175][175]":printspc(13)"[144][170][180][167][165][170] [205][206] [180][170][175][175]"
  20. 110 printspc(92)"time is duration"
  21. 111 printspc(93)"[144]it is measured"
  22. 112 printspc(55)"in minutes":printspc(15)"and hours":d=2:goto75
  23. 140 print"[147]":pokebc,4:pokebk,1:printspc(130)"[144] [205]    [175]"
  24. 145 printspc(10)"[144]  [205]  [206][204] [180][170][183][180] [207][170] [208][207][205][206]"
  25. 150 printspc(10)"[144]   [205][206] [204] [204][170][175][180] [204][170] [167][165][167][165]"
  26. 155 printspc(92)"velocity is speed":printspc(93)"[144]it is measured"
  27. 160 printspc(13)"in feet/second":printspc(13)"or miles/hour":d=3:goto75
  28. 185 print"[147]":pokebc,7:pokebk,1
  29. 189 printspc(129)"   [175]   [175]          [175]"
  30. 190 printspc(9)"   [180][205][167][165][204] [208][207][206][205][170][205][180][207] [204]"
  31. 195 printspc(9)"   [180][206][167][165][186] [167][165][207][208][170] [180][204] [204]"
  32. 196 printspc(9)"   [163]"
  33. 200 printspc(91)"distance is length":printspc(92)"[144]it is measured"
  34. 205 printspc(52)"in feet or miles": d=4:goto75
  35. 225 print"[147]":pokebc,13:pokebk,1:printspc(132)"*instructions*"
  36. 226 print:print:printtab(11)"you will be given"
  37. 230 printspc(11)"problems to solve":printspc(11)"with time,distance"
  38. 231 printspc(11)"and velocity."
  39. 235 printspc(11)"answer with the":printspc(11)"correct number."
  40. 236 printspc(11)"ignore remainders."
  41. 237 printspc(11)"do not give units.":d=5:goto75
  42. 250 print"[147]":pokebc,10:pokebk,1:pokecp,(peek(cp)and240)+12
  43. 255 a=int(rnd(0)*3+1):b=int(rnd(0)*7+1):x=int(rnd(0)*21+5):y=int(rnd(0)*101+50)
  44. 260 ifa=1thend$="feet":tt$="seconds":v$="f/s"
  45. 265 ifa=2thend$="miles":tt$="hours":v$="mph"
  46. 270 ifa=3thend$="feet":tt$="minutes":v$="f/m"
  47. 280 onbgosub440,470,440,455,470,440,470
  48. 285 print:print:print:printtab(29)"[144][\":printtab(29)"]("
  49. 290 forn=29to25step-1:printtab(n)"(":nextn
  50. 295 printtab(22)"'''''":printtab(22)"'''''"
  51. 300 printtab(5)"[156]''''''''''[158]  %%%%%''''''''''"
  52. 301 printtab(3)"[156]'''''''''''''''''''''''''''''''''"
  53. 305 print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
  54. 310 z=1024+(9*40)+30:v=54272:c=z+v
  55. 315 input"[144]     ";s$:s=val(s$):ifs=kthen360
  56. 330 pokev+24,143:print"  uh uh! sorry  "
  57. 335 form=60to20step-5:pokev,int(m/3):pokev+1,m:fort=1to15:nextt:nextm
  58. 340 q=5:gosub480:pokev+1,0:pokev,0:forn=1to4:pokez,32:pokez+39,32
  59. 341 pokez+40,32:pokez+41,32
  60. 345 pokez+40,30:pokec+40,0:pokez+79,35:pokec+79,0:pokez+80,31:pokec+80,0
  61. 350 pokez+81,36:pokec+81,0:z=z+40:c=c+40:nextn
  62. 354 forn=0to4:pokez+38+n,38:pokec+38+n,7:nextn:pokev,195:pokev+1,16
  63. 355 forl=15to5step-1:pokev+24,l:fort=1to50:nextt:nextl:pp=1:pokev,0:pokev+1,0
  64. 356 goto400
  65. 360 print" yep! thats right ":form=0to60step2:pokev,m/2
  66. 361 pokev+1,int(m/2):nextm:pokev,0:pokev+1,0
  67. 362 q=10:gosub480:forn=1to3:pokez,32:pokez+39,32
  68. 363 pokez+40,32:pokez+41,32
  69. 364 pokez+39,30:pokec+39,0:pokez+78,35:pokec+78,0:pokez+79,31:pokec+79,0
  70. 366 pokez+80,36:pokec+80,0:z=z+39:c=c+39:nextn
  71. 367 pokev+24,143
  72. 368 form=12to60step4:pokev,m/2:pokev+1,m:fort=1to25:nextt:nextm:pokev,0
  73. 369 pokev+1,0:pp=2
  74. 400 print"[147]":pokebc,14:pokebk,1
  75. 404 ifpp=2then410
  76. 405 print:print:printspc(171)"you lost  this time"
  77. 406 printspc(90)"better luck next time"
  78. 407 goto415
  79. 410 print:print:printspc(206)"you solved the given problem"
  80. 415 d=5:goto75
  81. 440 k=int(y/x)
  82. 441 printspc(42)"[144]a skier went ";y:print"  ";d$
  83. 442 print"[144]  in ";x;"";tt$
  84. 445 print"[144]  what was his":print"[144]  velocity in ";v$:return
  85. 455 k=x*y:printspc(42)"[144]a skier went ";x
  86. 456 print"  ";v$:print"[144]  for ";y"";tt$
  87. 460 print"[144]  what was his":print"[144]  distance in ";"";d$:return
  88. 470 k=int(y/x)
  89. 471 printspc(42)"[144]a skier went ";y:print"  ";d$
  90. 472 print"[144]  at ";x;"";v$
  91. 475 print"[144]  how much time did":print"[144]  he ski in ";tt$:return
  92. 480 forn=1to5:pokez,32:pokez+1,32:pokez+40,32:pokez+39,27:pokec+39,0
  93. 482 pokez+40,28:pokec+40,0:pokez+79,29:pokec+79,0:z=z+39:c=c+39:nextn
  94. 484 pokev+24,0:z=z-39:pokez,32:pokez+1,32:pokez+40,32
  95. 486 z=1024+(14*40)+24:c=z+v:pokez+1,32
  96. 488 forn=1toq:pokez,32:pokez+39,32:pokez+40,32:pokez+41,32
  97. 490 pokez-1,30:pokec-1,0:pokez+38,35:pokec+38,0:pokez+39,31:pokec+39,0
  98. 492 pokez+40,36:pokec+40,0:z=z-1:c=c-1:nextn:return
  99. 500 data96,96,60,31,44,72,142,3,0,0,0,128,16,32,64,128,1,2,4,12,0,0,0,0,0,0,0
  100. 505 data24,24,8,30,45,76,152,16,16,24,8,56,255,0,0,0,0,0,0
  101. 506 data16,15,128,64,32,0,0,0,0,240
  102. 510 data56,56,124,126,255,255,255,255,74,32,136,2
  103. 512 data212,21,162,205,255,255,255,255
  104. 515 data255,255,255,255,1,2,4,8,16,32,64,128
  105. 520 data31,21,175,195,16,125,31,21,275,195,16,125,239,19,150,195,16,100
  106. 525 data239,19,150,195,16,100,239,19,125,209,18,300,31,21,175,195,16,125
  107. 530 data31,21,170,96,22,200,31,21,230,209,18,115,195,16,400,-1,-1,-1
  108.